﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yun.Interface;
using Yun.Response;
using Yun.Util;

namespace Yun.IM.Request
{
    /// <summary>
    /// 退出群组
    /// yun.im.rongcloud.group.quit
    /// </summary>
    public class QuitIMGroupRequest : ITopRequest<IntResultResponse>
    {
        /// <summary>
        /// 来源组ID（例如：嗖嗖溜达的圈ID）
        /// </summary>
        public int SgId { get; set; }

        /// <summary>
        /// 用户ID，多个用户用英文逗号隔开
        /// </summary>
        public string UserIds { get; set; }


        public string GetApiName()
        {
            return "yun.im.rongcloud.group.quit";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"sgid", SgId},
                {"userids", UserIds}
            };

            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("sgid", SgId);
            RequestValidator.ValidateRequired("userids", UserIds);
        }
    }
}
